import Vue from 'vue'
import VueRouter from 'vue-router'
import fa from "element-ui/src/locale/lang/fa";
// import home from '../components/test/home.vue'


//卫星图
// import Star from "../components/star/star.vue"
// import lineMap from "../components/star/lineMap.vue"
// import starData from "../components/star/starData.vue"

//聊天
// import chatList from "../components/chat/chatList.vue"
// import chatInfo from "../components/chat/chatInfo.vue"
// import groupInfo from "../components/chat/groupInfo.vue"

//通讯录
// import addRess from '../components/address/addRess.vue'
// import groupsList from '../components/address/groupsList.vue'
// import addFriend from "../components/address/addFriend.vue";
// import friendInfo from "../components/address/memberInfo.vue"

//报文管理
// import messageBox from "../components/address/messageBox.vue"

//设置相关
// import settingList from "../components/setting/settingList.vue"

//引入chat相关
// import chatHome from "../components/chatPart/chatHome.vue"
// import chatMember from "../components/chatPart/chatMember.vue"
// import addMember from "../components/chatPart/addMember.vue"
// import groupRelate from "../components/chatPart/groupRelate.vue"
Vue.use(VueRouter)

const routes = [
    {
        path: '/',
        redirect: '/map'
    },
    {
        path: '/login',
        name: 'login',
        component: () => import('@/views/Login2.vue'),
        meta: {title: '登录', isShowTitle: false,isShowTab:false}
    },
    // {
    //     path: '/chathome',
    //     name: 'chathome',
    //     component: () => import('@/components/chatPart/chatMember'),
    //     meta: {title: '报文', isShowTitle: true,isShowTab:true}
    // },
    //聊天页面---列表
    {
        path: '/chatlist',
        name: 'chatList',
        component: () => import('@/components/chat/chatList'),
        meta: {title: '报文', isShowTitle: false,isShowTab:true}
    },
    {
        path: "/chatmember",
        component: () => import('@/components/chatPart/chatMember'),
        meta: {title: '通讯录', isShowTitle: false,isShowTab:false}
    },
    {
        path: "/addmember",
        component: () => import('@/components/chatPart/addMember'),
        meta: {title: '添加人员', isShowTitle: false,isShowTab:false}

    },
    //朋友详情
    {
        path: '/memberinfo',
        name:'memberinfo',
        component: () => import('@/components/chatPart/memberInfo'),
        meta: {title: '人员详情', isShowTitle: false,isShowTab:false}
    },
    //聊天页面--详情
    {
        path: '/chatinfo',
        name: 'chatInfo',
        component: () => import('@/components/chat/chatInfo'),
        meta: {title: '聊天页', isShowTitle: false,isShowTab:false}
    },
    {
        path: '/gaofen',
        name: 'gaofen',
        component: () => import('@/components/gaofen/GaoFen'),
        meta: {title: '高分', isShowTitle: true,isShowTab:true}
    },

    {
        path: '/task',
        // component: resolve => require(/* webpackChunkName: "home" */ ['@/components/task/Task.vue'], resolve),
        component: () => import('@/components/task/Task'),
        meta: {title: '任务', isShowTitle: true,isShowTab:true},
        children: [],
    },
    {
        path: '/navimap',
        name:'navimap',
        component: () => import('@/views/Navigation'),
        // component: resolve => require(/* webpackChunkName: "home" */ ['@/views/Navigation.vue'], resolve),
        meta: {title: '导航', isShowTitle: false,isShowTab:false},
        children: []
    },
    {
        path: '/map',
        name:'map',
        component: () => import('@/views/Map'),
        // component: resolve => require(/* webpackChunkName: "home" */ ['@/views/Navigation.vue'], resolve),
        meta: {title: '地图', isShowTitle: true,isShowTab:true},
        children: []
    },
    {
        path: '/mine',
        component: resolve => require(/* webpackChunkName: "home" */ ['@/components/mine/Mine'], resolve),
        meta: {title: '我的', isShowTitle: true,isShowTab:true},
        children: []
    },
    {
        path: '/maptest',
        component: resolve => require(/* webpackChunkName: "home" */ ['@/views/LeafBoxMap'], resolve),
        meta: {title: '123', isShowTitle: true,isShowTab:true},
        children: []
    },
    //聊天相关页面


    {
        path: '/maphome',
        component: resolve => require(/* webpackChunkName: "home" */ ['@/views/LeafletMap.vue'], resolve),
        meta: {title: '地图', isShowTitle: true},
        children: [],
    },



]

const router = new VueRouter({
    mode: 'hash',
    base: process.env.BASE_URL,
    routes
})

export default router